package  tool;

import java.util.HashMap;
import java.util.Map;

public class CommonTool {
	public static boolean isEmpty(String str){
		if(str==null||"".equals(str.trim())||"[]".equals(str)){
			return true;
		}else{
			return false;
		}
	}
	public static Map<String,Object> returnMap(String info,boolean success,Object entity){
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("info", info);
		map.put("success", success);
		if(entity!=null){
			map.put("entity", entity);
		}
		return map;
	}
}
